package com.ztesoft.iom.adapter.server.webservice.oss;

import com.ztesoft.iom.adapter.server.vo.test.*;
import org.springframework.ws.server.endpoint.annotation.Endpoint;
import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
import org.springframework.ws.server.endpoint.annotation.RequestPayload;
import org.springframework.ws.server.endpoint.annotation.ResponsePayload;

/**
 * Created by kangkang on 2018/4/10.
 */
@Endpoint
public class OSSProcessSheetEndpoint {
    @PayloadRoot(namespace = "http://www.ztesoft.com/webservice", localPart = "newWorkSheet")
    @ResponsePayload
    public GetCountryResponse newWorkSheet(@RequestPayload NewWorkSheet newWorkSheet) {
        GetCountryResponse response = new GetCountryResponse();
        Country country = new Country();
        country.setName(newWorkSheet.getName());
        country.setCapital("OSSProcessSheet.newWorkSheet");
        response.setCountry(country);
        return response;
    }

    @PayloadRoot(namespace = "http://www.ztesoft.com/webservice", localPart = "renewWorkSheet")
    @ResponsePayload
    public GetCountryResponse renewWorkSheet(@RequestPayload GetCountryRequest request) {
        GetCountryResponse response = new GetCountryResponse();
        Country country = new Country();
        country.setName("OSSProcessSheet.renewWorkSheet");
        response.setCountry(country);
        return response;
    }
}
